# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-skpy
pkgname=('python2-skpy' 'python-skpy')
_pkgname=SkPy
pkgver=0.11
pkgrel=2
pkgdesc='An unofficial Python library for interacting with the Skype HTTP API.'
arch=('any')
url='https://pypi.org/project/skpy/#files'
license=('custom:unknown')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/SkPy-$pkgver.tar.gz")
sha512sums=('1e934790fa0a6e468d318ed27d978af444cddbf8efccf0980d434f2a43cac657626c23d22d6990b6fce866923c3dec3088c7508e59f92b19ee9b91cde79bb685')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-skpy() {
  depends=('python2' 'python2-beautifulsoup4' 'python2-requests')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

package_python-skpy() {
  depends=('python' 'python-beautifulsoup4' 'python-requests')

  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

